From: Philip Withnall Date: Mon, 20 Nov 2017 14:51:04 +0000 (+0000) Subject: tests: Fix LC_ALL for systems which use .utf8 suffixes X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~4^2~28^2~12 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22Program/%22http:/www.example.com/cgi/%22https:/%22Program?a=commitdiff_plain;h=e48a1bcfe7e879479b3b608bd8607cad0dd14149;p=ostree.git tests: Fix LC_ALL for systems which use .utf8 suffixes libtest-core.sh tries to clear the locale to a UTF-8 supporting C locale, either by setting it to C.UTF-8 (preferred) or just C. Some systems, like Fedora 26, use the locale name C.utf8, rather than C.UTF-8. Support that too. Signed-off-by: Philip Withnall Closes: #1347 Approved by: cgwalters --- diff --git a/tests/libtest-core.sh b/tests/libtest-core.sh index ce0e4bb1..2144e1ac 100644 --- a/tests/libtest-core.sh +++ b/tests/libtest-core.sh @@ -37,6 +37,8 @@ assert_not_reached () { # (https://sourceware.org/glibc/wiki/Proposals/C.UTF-8) if locale -a | grep C.UTF-8 >/dev/null; then export LC_ALL=C.UTF-8 +elif locale -a | grep C.utf8 >/dev/null; then + export LC_ALL=C.utf8 else export LC_ALL=C fi